@extends('layouts.admin')
@section('content')
	<style>
		.table tbody tr td{
			text-align:center;
		}
		.myformm{
			margin-left:20px;
			margin-bottom:-30px;
		}
		.myformm select{
			margin-top:10px;
		}
	</style>

		<div id="content-header">
			<h1>Tables</h1>
			<div class="btn-group">
				<a class="btn btn-large tip-bottom" title="Manage Files"><i class="icon-file"></i></a>
				<a class="btn btn-large tip-bottom" title="Manage Users"><i class="icon-user"></i></a>
				<a class="btn btn-large tip-bottom" title="Manage Comments"><i class="icon-comment"></i><span class="label label-important">5</span></a>
				<a class="btn btn-large tip-bottom" title="Manage Orders"><i class="icon-shopping-cart"></i></a>
			</div>
		</div>
		<div id="breadcrumb">
			<a href="#" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a>
			<a href="#" class="current">Tables</a>
		</div>
		<div class="myformm">
			<form action="{{url('admin/CategoryList')}}" method="get" enctype="multipart/form-data">
				{{csrf_field()}}
						<select class="" name="id">
							<option value="0" >请选择...</option>
							<option value="cateid" >查看所有顶级分类</option>
							@foreach($searchlist as $sear)
								<option value="{{$sear['id']}}">{{str_repeat('&nbsp;', $sear['count'] * 8).'|--'.$sear['name']}}</option>
							@endforeach
						</select>
						<input class="" role="group" type="submit" value="搜索">
			</form>
		</div>
		<div class="container-fluid">
			<div class="row-fluid">
				<div class="span12">
					<div class="widget-box">
						<div class="widget-title">
								<span class="icon">
									<i class="icon-th"></i>
								</span>
							<h5>分类列表</h5>
						</div>
						<div class="widget-content nopadding">
							<table class="table table-bordered table-striped">
								<thead>
								<tr>
									<th>分类ID</th>
									<th>分类名称</th>
									<th>分类描述</th>
									<th>访问量</th>
									<th>推荐状态</th>
									<th>显示状态</th>
									<th>创建时间</th>
									<th>操作</th>
								</tr>
								</thead>
								<tbody id="tbody">
								@foreach($CateList as $cate)
								<tr>
									<td>{{$cate['id']}}</td>
									<td>{{str_repeat('&nbsp;', $cate['count'] * 8).'|--'.$cate['name']}}</td>
									<td>{{$cate['describe']}}</td>
									<td>{{$cate['visitor']}}</td>
									<td>{{$cate['recommend']==1?'推荐':'非推荐'}}</td>
									<td>{{$cate['disstatus']==1?'显示':'隐藏'}}</td>
									<td>{{date('Y:m:d H:i:s',$cate['time'])}}</td>
									<td>
										<a href="{{url('admin/CategoryEdit?id=').$cate['id'].'&pid='.$cate['pid']}}"  class="btn btn-primary">修改</a>
										<a href="{{url('admin/CategoryDel?id=').$cate['id'].'&pid='.$cate['pid']}}"  class="btn btn-primary">删除</a>
									</td>
								</tr>
								@endforeach
								</tbody>
							</table>

						</div>
					</div>
				</div>
			</div>

			<div class="row-fluid">
				<div id="footer" class="span12">
					2012 &copy; Unicorn Admin. Brought to you by <a href="https://wrapbootstrap.com/user/diablo9983">diablo9983</a>
				</div>
			</div>
		</div>
@endsection